<template>
  <div>
    <Button type="primary" @click="submit">提交</Button>
    <Button style="margin-left: 10px" type="primary" @click="complete">审批</Button>
  </div>
</template>
<script>
import {Button} from 'ant-design-vue';
import FlowRequest from '@/request/FlowRequest';

export default {
  name: 'SubmitForm',
  components: {
    Button
  },
  methods: {
    complete() {
      FlowRequest({baseURL: '/h-flow', headers: {}}).complete({
        flowUserTaskId: '1774592067052556289',
        formModel: {},
        userTaskComment: {}
      }, () => {
        console.log('complete!!!');
      });
    },
    submit() {
      FlowRequest({baseURL: '/h-flow', headers: {}}).preStart({
        formModel: {
          "age": 10
        },
        formTypeId: "1",
        formId: null
      }, formModel => {
        console.log(JSON.stringify(formModel));
      });
    },
  }
};
</script>